// Learn cc.Class:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const UIPanelManager = require("./UIPanelManager");

cc.Class({
    extends: cc.Component,

    properties: {

    },

    onLoad () { 
        this.node.on(cc.Node.EventType.TOUCH_START, this.onBtnClose, this);
    },

    onBtnClose() {
        UIPanelManager.close(this.node.parent);
    },
});
